package com.cfl.user;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import com.cfl.user.service.UserService;
import com.cfl.user.service.impl.UserServiceImpl;

@SpringBootApplication(exclude={DataSourceAutoConfiguration.class,HibernateJpaAutoConfiguration.class})
@EnableEurekaClient
@ComponentScan(basePackages = "com.cfl.user")
@EnableFeignClients
@EnableCircuitBreaker
public class UserApplication {

	@Bean
	public UserService userService() {
		return new UserServiceImpl();
	}
	
	public static void main(String[] args) throws Exception {
		SpringApplication.run(UserApplication.class, args);
	}
}
